<?php   
        $form = $this->form;
        $session_list=$this->session_list;
        
        $form->setAttribute('action', $this->url(NULL, array(
            'controller' => 'completedevent',
            'action' => 'process',
            'id' => $this->id,
        )));
        $form->prepare();
        
  /*       $value = 0;
        $option = array ();
        foreach ( $session_list as $session ) {
            $value = $this->escapeHtml ( $session->TOPIC ); // 'name' name of the column in the database
            $id = $this->escapeHtml ( $session->ID );
            $option [] = array (
                'value' => $id,
                'label' => $value
            );
        }
        $form->get ( 'SESSIONS' )->setAttributes ( array (
            'options' => $option
        ) ); */
        $option [] = array (
            'value' => '2',
            'label' => 'Completed'
        );
        $form->get ( 'EVENT_STATUS' )->setAttributes ( array (
            'options' => $option
        ) );
?>

<div class="container">
	<div class="row">
		<div class="col-md-10">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">Add or Edit Events</h3>
				</div>

				<div class="panel-body">
				<?php echo $this->form()->openTag($form); ?>
				<?php $this->form->get('ID')->setValue($this->id);
				      echo $this->formelement($form->get('ID'));
				?>
                    <div class="form-group">
						<label class="col-md-2 control-label"><?php echo $this->formlabel($form->get('TITLE'));?></label>
						<div class="col-md-10">
                            <?php   echo $this->formElement($form->get('TITLE'));?>
                            <span class="errormsgform"><?php   echo $this->formElementErrors($form->get('TITLE')); ?></span>
                        </div>
					</div>
					
					<div class="form-group">
						<label class="col-md-2 control-label"><?php echo $this->formlabel($form->get('DATE'));?></label>
						<div class="col-md-10">
                            <?php   echo $this->formElement($form->get('DATE')); ?>
                            <span class="errormsgform"><?php   echo $this->formElementErrors($form->get('DATE')); ?></span>
                        </div>
					</div>
										
					<div class="form-group">
						<label class="col-md-2 control-label"><?php echo $this->formlabel($form->get('SUBJECT'));?></label>
						<div class="col-md-10">
                            <?php   echo $this->formElement($form->get('SUBJECT')); ?>
                            <span class="errormsgform"><?php   echo $this->formElementErrors($form->get('SUBJECT')); ?></span>
                        </div>
					</div>
					
					<div class="form-group">
						<label class="col-md-2 control-label"><?php echo $this->formlabel($form->get('DESCRIPTION'));?></label>
						<div class="col-md-10">
                            <?php   echo $this->formElement($form->get('DESCRIPTION')); ?>
                            <span class="errormsgform"><?php   echo $this->formElementErrors($form->get('DESCRIPTION')); ?></span>
                        </div>
					</div>
					
					<div class="form-group">
						<label class="col-md-2 control-label"><?php echo $this->formlabel($form->get('PLACE'));?></label>
						<div class="col-md-10">
                            <?php   echo $this->formElement($form->get('PLACE')); ?>
                            <span class="errormsgform"><?php   echo $this->formElementErrors($form->get('PLACE')); ?></span>
                        </div>
					</div>
					
					<div class="form-group">
						<label class="col-md-2 control-label"><?php echo $this->formlabel($form->get('CATEGORY'));?></label>
						<div class="col-md-10">
                            <?php   echo $this->formElement($form->get('CATEGORY')); ?>
                            <span class="errormsgform"><?php   echo $this->formElementErrors($form->get('CATEGORY')); ?></span>
                        </div>
					</div>
					
					<div class="form-group">
						<label class="col-md-2 control-label"><?php echo $this->formlabel($form->get('SEATS'));?></label>
						<div class="col-md-10">
                            <?php   echo $this->formElement($form->get('SEATS')); ?>
                            <span class="errormsgform"><?php   echo $this->formElementErrors($form->get('SEATS')); ?></span>
                        </div>
					</div>
					
					<div class="form-group">
						<label class="col-md-2 control-label"><?php echo $this->formlabel($form->get('EVENT_STATUS'));?></label>
						<div class="col-md-10">
                            <?php   echo $this->formElement($form->get('EVENT_STATUS')); ?>
                            <span class="errormsgform"><?php   echo $this->formElementErrors($form->get('EVENT_STATUS')); ?></span>
                        </div>
					</div>
					
					<div class="form-group">
						<label class="col-md-2 control-label"></label>
						<div class="col-md-10">
                            <?php echo $this->formElement($form->get('BTNSAVE')); ?>
                            <?php //echo $this->formElement($form->get('BTNCLEAR')); ?>
                            <div class="btn btn-default"><a href="<?php echo $this->url('events',array('controller'=>'CompletedEvent'));?>" style="text-decoration: none;color:#413C3C">Cancel</a></div>
                        </div>
					</div>                  
                    
                <?php echo $this->form()->closeTag();?>
                </div>
			</div>
		</div>
	</div>
</div>
